/*******************************************/
/*        (c) Pavel Bacovsky, Ph.D.        */
/*     			Bates College		       */
/*  	   Department of Politics		   */
/*           Lewiston, ME 04240            */
/*           pbacovsky@bates.edu           */  
/*             www.bacovsky.phd            */
/*******************************************/ 

clear
use "Bacovsky-LevelUpData_JEPS_Replication.dta", clear

/* Cleanup of low-quality data (rqindex must be at least 0.6) */
keep if rqindex >= 0.6

/********************************************/
/*                 KEY IVs                  */
/********************************************/
* Figure 2: Gamer Identity Measures
	*Importance of being a gamer*
	tab treatment pt2, row
	tab treatment pt2, col
	
	*How well gamer describes*
	tab treatment pt3, row
	tab treatment pt3, col
	
	*How often do you speak of gamers as we versus them*
	tab treatment pt4, row
	tab treatment pt4_1, row
	tab treatment pt4, col
	tab treatment pt4_1, col
	
	*To what extent do you think of yourself as a gamer.
	tab treatment pt5, row
	tab treatment pt5, col

	*Time spent gaming, daily
	tab treatment pt9, row

/********************************************/
/*           DEPENDENT VARIABLES            */
/********************************************/
*Figure 3: Interest in U.S. foreign trade breakdown **/
	*General*
	tab pt1    //Pre-test
	sum pt1, detail
	tab dv11_1 //Post-test
	sum dv11_1, detail
	
	*Specific*
	tab dv11_2 //Post-test
	sum dv11_2, detail
	
/********************************************/
/*          DESCRIPTIVE STATISTICS          */  
/*               (Appendix 2)               */
/********************************************/

* Figure A2.1 Age (Brackets)
tab d1_cat

* Figure A2.2 Gender
tab d6
tab treatment d6, col

* Figure A2.3 Ethnicity
tab d7
tab treatment d7, col

* Figure A2.4 Education Attainment
tab d5
tab treatment d5, col

* Figure A2.5 Employment Status
tab d4
tab treatment d4, col

sum d8, detail 					// Mean Income

* State and Area of Residence
tab d2                         // Table A2.1: Sample Breakdown by State
tab d3						   // Figure A2.6: Sample Breakdown by City Size

* Ideology and PID
tab d9                         // Figure 2.7: Sample Breakdonw by Party ID
tab treatment d9, col
sum d9, detail

tab d10                        // Figure 2.8: Sample Breakdown by Ideology
tab treatment d10, col
sum d10, detail

* Figure A2.8: Majority of the sample passed the manipulation checks
/* Panel A: Manipulation Check #1, Goods */
tab treatment mc1, row

/* Panel B: Manipulation Check #2, Country */
tab treatment mc2, row

/* Panel C: Manipulation Check #3, Price */
tab treatment mc3, row

* Table A2.2: Internal Consistency of the Gamer Identity Index
alpha pt2 pt3 pt5, detail item

/********************************************/
/*              BALANCE TESTS               */
/*               (Appendix 2)               */
/********************************************/

* Table A2.3: Balance Test Correlation Matrix #1
corr treatment pt1 pt2 pt3 pt4 pt5 gid, wrap

* Table A2.4: Balance Test Correlation Matrix #2
corr treatment d1_cat d2 d3 d4 d5 d6 d7 d9 d10, wrap